# 定时任务增加日志的方法
from apps.settingApi.api.timerTask.model import timerTaskLogModel
from apps.settingApi.switchCase.casePrimaryKey import caseGetPrimaryKeyData

def add(db,data):
    logData = {}
    logData['id'] = caseGetPrimaryKeyData()
    logData['status'] = data['status']
    logData['name'] = data['name']
    logData['order'] = data['order']
    logData['data'] = data['data']
    logData['rem'] = data['rem']
    db.add(timerTaskLogModel(**logData))
    db.commit()